package view;


import Model.Perpustakaan;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextArea;


public class PanelBacaPublikasi extends JPanel {
    private JLabel labelPanel;
    private JTextArea areaPublikasi;

    public PanelBacaPublikasi() {
        setLayout(null);

        labelPanel = new JLabel("FORM LIHAT PUBLIKASI");
        labelPanel.setBounds(100, 15, 300, 40);
        add(labelPanel);
        try {
            Perpustakaan.bacaFilePublikasi();
        } catch (FileNotFoundException ex) {
            Logger.getLogger(PanelBacaPublikasi.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(PanelBacaPublikasi.class.getName()).log(Level.SEVERE, null, ex);
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(PanelBacaPublikasi.class.getName()).log(Level.SEVERE, null, ex);
        }
        areaPublikasi = new JTextArea(Perpustakaan.bacaDaftarPublikasi());
        areaPublikasi.setBounds(100, 50, 300, 250);
        add(areaPublikasi);
        setVisible(true);
    }
}
